package cn.wolfcode.rbac.domain;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data @AllArgsConstructor @NoArgsConstructor
public class Customer extends BaseDomain{
        private String name;
        private Integer age;
        private String sn;
        private Integer gender;
        private String tel;
        private String qq;
        private Long jobId;
        private Long sourceId;
        private Long sellerId;
        private Long inputUserId;
        private String inputTime;
        private Integer status;
        private String displayGender;
        private String displayStatus;
        private SystemDictionaryItem job;
        private SystemDictionaryItem source;
        private Employee seller;
        private String sellerName;
        /*private List<SystemDictionaryItem> jobs;
        private List<SystemDictionaryItem> sources;*/

        public String getJsonString(){
                Map map = new HashMap();
                map.put("id",id);
                map.put("name",name);
                map.put("age",age);
                map.put("sn",sn);
                map.put("gender",gender);
                map.put("tel",tel);
                map.put("qq",qq);
                map.put("status",status);
                map.put("jobId",jobId);
                map.put("sourceId",sourceId);
                map.put("sellerId",sellerId);
                map.put("inputUserId",inputUserId);
                map.put("inputTime",inputTime);
                map.put("displayGender",displayGender);
                map.put("displayStatus",displayStatus);
                map.put("sellerName",sellerName);
                return JSON.toJSONString(map);
        }

}
